package com.example.project.presenter;

import com.example.project.base.BasePresenter;
import com.example.project.model.MainModel;
import com.example.project.net.ResultCallBack;
import com.example.project.view.MainView;
import com.hyphenate.easeui.domain.EaseUser;

import java.util.Map;

public class MainPresenter extends BasePresenter<MainView> {
    private MainModel mMainModel;


    public void getContacts() {
        mMainModel.getContacts(new ResultCallBack<Map<String, EaseUser>>() {
            @Override
            public void onSuccess(Map<String, EaseUser> map) {
                mView.setContacts(map);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }

    @Override
    public void initModel() {
        mMainModel = new MainModel();
        addModel(mMainModel);
    }
}
